<%--
说明：工单复核  页面

@author mlchao 2012-04-07
--%>
<%@ include file="../../common/common.jsp"%>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<title>工单复核 </title>
<script src="jsp/workflow/p_wf_order/p_wf_order_check_edit.js" type="text/javascript" charset="UTF-8"></script>
<style type="text/css">
.tableRow {
	text-align: center; 
	background-color: #f3f7fd; 
	border-top-width: 1px;
	border-right-width: 1px;
	border-top-style: solid;
	border-right-style: solid;
	border-bottom-style: none;
	border-left-style: none;
	border-top-color: #FFFFFF;
	border-right-color: #FFFFFF;
}
</style>
</head>

<body>
  <%-- 查询条件form --%>
  <form id="opeForm" name="opeForm" method="post">
    <input type="hidden" id="order_id" name="model.order_id" value="${model.order_id}" />
    <table id="rscTable" width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
      <tr style="width: 100%" class="tableRow">
        <td class="" colspan="12" width="100%">
          <table id="listTable" width="100%">
          <thead>
      <tr align="center" style="text-align: center; width: 100%; height: 25px">
        <td class="tableRow" align="center" style="width: 4%;" nowrap="nowrap">&nbsp;</td>
      	<td class="tableRow" align="center" style="width: 12%;" nowrap="nowrap">资源组</td>
      	<td class="tableRow" align="center" style="width: 13%;" nowrap="nowrap">资源</td>
      	<td class="tableRow" align="center" style="width: 10%;" nowrap="nowrap">账号</td>
      	<td class="tableRow" align="center" style="width: 8%;" nowrap="nowrap">协议</td>
      	<td class="tableRow" align="center" style="width: 5%;" nowrap="nowrap">端口</td>
      	<td class="tableRow" align="center" style="width: 5%;" nowrap="nowrap">运维目的</td>
      	<td class="tableRow" align="center" style="width: 4%;" nowrap="nowrap">长期有效</td>
      	<td class="tableRow" align="center" style="width: 14%;" nowrap="nowrap">开始时间</td>
      	<td class="tableRow" align="center" style="width: 5%;" nowrap="nowrap">有效期(分钟)</td>
      	<td class="tableRow" align="center" style="width: 10%; nowrap="nowrap">命令策略</td>
      </tr>
      </thead>    
      <tbody>
      <c:forEach var="rsc" items="${pagedRecords.list}" varStatus="status">
	  	<tr style="width: 90%; height: 25px;">
          <td class="tableRow" align="center" nowrap="nowrap" style="width:4%;">
          	<input type="hidden" id="acl_apply_id_${status.index}" name="acl_apply_id" value="${rsc.ACL_APPLY_ID}" />
          	${status.index +1}&nbsp;
          </td>	  	
          <td class="tableRow" align="center" style="width: 12%;">
          	${rsc.RSC_GRP_NAME}&nbsp;
          </td>
          <td class="tableRow"  align="left" style="width: 13%;" nowrap="nowrap">
          	${rsc.RSC_NAME}&nbsp;
          </td>
          <td class="tableRow" align="center" style="width: 10%;">
          	${rsc.RSC_ACC_NAME}&nbsp;
          </td>
          <td class="tableRow" align="center" style="width: 8%;">
          	${rsc.RSC_PRO_NAME}&nbsp;
          </td>
          <td class="tableRow" align="center" style="width: 5%;">
          	${rsc.RSC_PRO_PORT}&nbsp;
          </td>
          <td class="tableRow" align="center" style="width: 5%;">
          	<ext:property cachetype="P_TYPE_VALUE" resultprop="type_value_name" condnames="type_code;type_value_code" condvalues="121;${rsc.OPERATION_TYPE}" />
          </td>          
          <td class="tableRow" align="center" style="width: 4%;">
          	<select id="is_longterm_valid_${status.index}" name="is_longterm_valid" onchange="is_longterm_validChange(${status.index})" style="width: 80%">
          		<option value="1" <c:if test="${rsc.IS_LONGTERM_VALID == 1}">selected</c:if> >是</option>
          		<option value="0" <c:if test="${rsc.IS_LONGTERM_VALID == 0}">selected</c:if>>否</option>
          	</select>
          </td>
          <td class="tableRow" align="left" style="width: 14%; text-align: left;">
          	<input type="text" id="start_time_${status.index}" name="start_time" value="${rsc.START_TIME}" readonly="readonly" style="width: 130px" class="easyui-validatebox  editMainText" maxlength=19 />
          	<c:if test="${rsc.IS_LONGTERM_VALID == 0}" >
          		<img id="img_${status.index}" src="<c:url value="/images/datetimepicker_css/cal.gif" />" onclick="javascript:NewCssCal ('start_time_${status.index }','yyyyMMdd','dropdown',true,'24',true,'future')" style="cursor: pointer" />
          	</c:if>
          	<c:if test="${rsc.IS_LONGTERM_VALID == 1}" >
          	<img id="img_${status.index}" style="display: none" src="<c:url value="/images/datetimepicker_css/cal.gif" />" onclick="javascript:NewCssCal ('start_time_${status.index }','yyyyMMdd','dropdown',true,'24',true,'future')" style="cursor: pointer" />
          	</c:if>          
          </td>
          <td class="tableRow" align="left" style="width: 5%;">
			<input type="text" id="available_length_${status.index}" name="available_length" value="${rsc.AVAILABLE_LENGTH}" style="width: 98%" class="easyui-validatebox" validType="digit" />          
          </td>
          <td class="tableRow" align="center" style="width: 10%;">
          	<input type="hidden" id="policy_id_${status.index}" name="policy_id" value="${rsc.POLICY_ID}" />
          	<input type="text" id="policy_name_${status.index}"  name="" value="${rsc.CMD_POLICY_NAME}" readonly="readonly" style="width: 98%" class="easyui-validatebox" validType="" onclick="select_cmdpolicy(${status.index})" />
          </td>
      </tr>
	  </c:forEach>
	  <tr align="center" style="text-align: center; width: 100%">
        <td class="tableRow" align="right" style="height:14px; width: 100%; height:30px; text-align: right;" colspan="12" >
      		第  ${pagedRecords.page} 页 / 共  ${pagedRecords.totalPage} 页(共  ${pagedRecords.totalNum} 条记录)&nbsp;&nbsp;&nbsp;&nbsp; 
		    	<c:if test="${!pagedRecords.firstPage}">
					<a href="javascript:turn(1);">首页</a>&nbsp;&nbsp;
					<a href="javascript:turn(<c:out value="${pagedRecords.page-1}"/>);">上一页</a>&nbsp;&nbsp;
				</c:if>		 
				<c:if test="${!pagedRecords.lastPage}">
					<a href="javascript:turn(<c:out value="${pagedRecords.page+1}"/>);">下一页</a>&nbsp;&nbsp;
    			    <a href="javascript:turn(<c:out value="${pagedRecords.totalPage}"/>);">末页</a>&nbsp;&nbsp;
				</c:if> 
				<input type="hidden" id="page" name="page" value="<c:out value="${pagedRecords.page+1}"/>" size="4">&nbsp;&nbsp;		
        </td>
      </tr>
	  </tbody>
          </table>
          </td>
      </tr>
      <tr style="height: 100%">
        <td class="tableRow" colspan="13"></td>
       </tr>
      <tr>
      	<td class="editMainBottomTD" >
			<table width="100%" >
				<tr>
					<td style="width: 20%; text-align: right;">申请原因：&nbsp;</td>
					<td style="width: 80%; text-align: left;">
						<textarea id="apply_reason" readonly="readonly" style="width: 80%; height: 30px">${pagedRecords.list[0].APPLY_REASON }</textarea>&nbsp;
					</td>
				</tr>			
				<tr>
					<td style="width: 20%; text-align: right;">复核意见：&nbsp;</td>
					<td style="width: 80%; text-align: lwft;">
						<textarea id="approve_content" name="model.approve_content" style="width: 80%"></textarea>&nbsp;
					</td>
				</tr>
			</table>
		 </td>
      </tr>     
      <tr>
        <td class="editMainBottomTD" colspan="12">&nbsp;
          <div style="text-align: content; padding: 5px; padding-bottom: 35px">        
           <a href="javascript:void(0)" id="refuseBtn" icon="icon-refuse" class="easyui-linkbutton">拒绝</a>
           <a href="javascript:void(0)" id="replyBtn" icon="icon-reply" class="easyui-linkbutton">同意 </a> 
          </div>
          </td>
      </tr>      
    </table>
  </form>

</body>
</html>
